package com.heima.freemarker.controller;

import com.heima.freemarker.entity.Student;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Date;

@Controller
public class HelloController {
    @GetMapping("/basic")
    public String test(Model model) {
        model.addAttribute("name", "freemarker");
        Student student = new Student("周杰伦", 18, new Date(), 1F);
        model.addAttribute("stu", student);
        return "01-basic";
    }
}
